/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;

/**
 * <p>Project: javase - Reg2
 * <p>Powered by webrx On 2021-12-06 14:11:00
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Reg2 {
    public static void main(String[] args) {
        String str = "hello--LL";
        String pattern = "[A-Z]";
        //System.out.println("a".equals("A"));//false
        //System.out.println("A".equals("A"));//true

        System.out.println(str);
        System.out.println(str.replaceAll("[lL]{2}", "java"));
        System.out.println(str.replaceFirst("[lL]{2}", "java"));
        System.out.println(Arrays.toString("java678mysql5html234124124124124314javascript".split("\\d+")));
        System.out.println("hello".matches("[a]"));//false
        System.out.println("hello".matches("[h]"));//false
        System.out.println("hello".matches("[a-z]"));//fasle
        System.out.println("Hello".matches("^[a-zA-Z]+$"));//true
        System.out.println("Hello".matches("^[a-zA-Z]{1,}$"));//true
        System.out.println("helloasdfasdfsfad-java".matches("[a-z]{1,}"));//false

    }
}
